package org.hard.model.structure.bridge;

import java.util.Objects;

/**
 * @author: 王林博
 * @date: 2023年02月17日 11:34
 */
// 所有设备都遵循相同的接口。
public class Tv implements Device{

    Integer volume;

    Integer channel;

    Boolean enable;
    @Override
    public Boolean isEnabled() {
        return Boolean.TRUE.equals(this.enable);
    }

    @Override
    public void enable() {
        this.enable = Boolean.TRUE;
    }

    @Override
    public void disable() {
        this.enable = Boolean.FALSE;
    }

    @Override
    public Integer getVolume() {
        return this.volume;
    }

    @Override
    public void setVolume(Integer volume) {
        this.volume = volume;
    }

    @Override
    public Integer getChannel() {
        return this.channel;
    }

    @Override
    public void setChannel(Integer channel) {
        this.channel = channel;
    }
}
